import App from './App'
import Vue from 'vue'
import {router,RouterMount} from './router/router.js'
import Mylink from 'uni-simple-router/dist/link.vue'
import store from './store'
import uView from '@/uni_modules/uview-ui'
import '@/api/index.js'
import '@/filter/index.js'
import mixin from '@/mixins/mixins.js'
import config from '@/config/index.js'
import { showModal, alert } from './utils/modal.js';

Vue.config.productionTip = false
App.mpType = 'app'
Vue.mixin(mixin)

Vue.use(router)
Vue.use(uView)

Vue.component('my-link',Mylink)
console.log('~~~~~~~~~~~~`')
console.dir(config);
console.log('~~~~~~~~~~~~`')

Vue.prototype.$modal = {
  show: showModal, 
  alert 
};

Vue.prototype.$appId = config.appId
Vue.prototype.$pwdreg = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]).{8,21}$/;
Vue.prototype.$baseUrl = config.baseUrl
Vue.prototype.$baseIMGUrl = config.baseUrl + '/gyg-miniapp'
Vue.prototype.$devBaseUrl = config.devBaseUrl
Vue.prototype.$shopUrl = uni.getStorageSync('shopUrl')
Vue.prototype.$loginPath = config.loginPath
Vue.prototype.$tenantId = config.tenantId

const app = new Vue({
	store,
    ...App
})
require('./utils/request/index')(app)
RouterMount(app,router,'#app')
app.$mount()

